package cn.itsource.order.controller;

import cn.itsource.basic.util.AjaxResult;
import cn.itsource.order.domain.UserAddress;
import cn.itsource.order.service.IUserAddressService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户地址控制器
 */
@RestController
@RequestMapping("/userAddress")
@Api(tags = "用户地址管理", description = "用户地址操作接口")
public class UserAddressController {

    @Autowired
    private IUserAddressService userAddressService;

    /**
     * 获取当前登录用户的地址
     * @return
     */
    @GetMapping("/findByUserId")
    public AjaxResult findByUserId(){

        //调用
        return userAddressService.findByUserId();

    }


}
